package net.oschina.app.fragment.explore;

import net.oschina.app.adapter.explore.EventDetilsAdapter;
import net.oschina.app.base.BaseListAdapter;
import net.oschina.app.base.BaseListFragment;
import net.oschina.app.bean2.MoveDetailBean;
import net.oschina.app.protocol.AccessProtocol;
import net.oschina.app.protocol.EventDetilsProtocol;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 张运湘 on 2017/1/18.
 */

public class EventDetilsFragment extends BaseListFragment {
    List<MoveDetailBean.PostBean>mList=new ArrayList<>();
    @Override
    protected List parseData(Object body) {
        MoveDetailBean.PostBean post = ((MoveDetailBean) body).getPost();
        mList.add(post);
        return mList;
    }

    @Override
    protected AccessProtocol getProtocol() {
        EventDetilsProtocol eventDetilsProtocol = new EventDetilsProtocol();
        return eventDetilsProtocol;
    }

    @Override
    protected BaseListAdapter getAdapter() {
        EventDetilsAdapter eventDetilsAdapter = new EventDetilsAdapter(getContext());
        return eventDetilsAdapter;
    }
}
